﻿<%@ Page Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true" CodeBehind="ApplicationList.aspx.cs"
    Inherits="iOak.Web.Administration.ApplicationList" %>

<%@ Register Src="~/Modules/PagerControl.ascx" TagName="PagerControl" TagPrefix="iOak" %>
<asp:Content runat="server" ContentPlaceHolderID="ContentPlaceHolder1">
    <script type="text/javascript">
        function modifyClick(id) {
            location.href = "PolicyDetails.aspx?campaignId=" + id;
        }

        function changeListMode(mode) {
            doPostBack("changeListMode", mode);
        }

        function doPostBack(name, args) {
            $('#<%=hidEventName.ClientID %>').val(name);
            $('#<%=hidEventArguments.ClientID %>').val(args);
            $('#<%=btnPostBack.ClientID %>').click();
        }

    </script>
    <div class="content">
        <div class="left_bar">
            <div class="left_menu">
                <div class="left_menu_top">
                    视图
                </div>
                <div class="sub_menu">
                    <ul>
                        <li>
                            <asp:HyperLink runat="server" ID="hlAll" Text="全部" NavigateUrl="javascript:changeListMode(0)"></asp:HyperLink></li>
                        <li style="display: none">
                            <asp:HyperLink runat="server" ID="hlSelf" Text="指派给我的" NavigateUrl="javascript:changeListMode(1)"></asp:HyperLink></li>
                    </ul>
                </div>
            </div>
        </div>
        <div class="right_bar">
            <div class="right_content">
                <table width="100%" border="0" cellspacing="0" cellpadding="0" style="background-color: #fff;">
                    <tr>
                        <td width="7" align="left" valign="top">
                            <img src="/images/tab-j_01.jpg" width="7" height="7" />
                        </td>
                        <td>
                            <div class="now-pac">
                                您现在的位置：<a href="#">申请书</a></div>
                        </td>
                        <td width="7" align="right" valign="top">
                            <img src="/images/tab-j_02.jpg" width="7" height="7" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            &nbsp;
                        </td>
                        <td>
                            <div style="border: 1px solid #ccc">
                                <div style="border: 1px solid #fff">
                                    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tab1">
                                        <tr>
                                            <td>
                                                <div class="table-header" style="position: relative;">
                                                    <div class="table-header_name" style="float: left">
                                                        <asp:Label runat="server" ID="lblApplicationName" Text="申请书列表"></asp:Label></div>
                                                    <div style="float: right; padding-right: 10px; padding-top: 11px">
                                                        <asp:DropDownList runat="server" ID="ddlApplication" CssClass="dropDown" AutoPostBack="true"
                                                            OnSelectedIndexChanged="ddlApplication_SelectedIndexChanged" Width="300px">
                                                        </asp:DropDownList>
                                                    </div>
                                                </div>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <asp:GridView runat="server" ID="gvApplication" Width="100%" AutoGenerateColumns="false"
                                                    OnRowDataBound="gvApplication_RowDataBound" CssClass="tab1">
                                                    <HeaderStyle CssClass="tab1_green" />
                                                    <RowStyle CssClass="itemRow" />
                                                    <AlternatingRowStyle CssClass="alternatingRow" />
                                                    <Columns>
                                                        <asp:TemplateField HeaderText="No." ItemStyle-HorizontalAlign="Right" ItemStyle-Width="15px">
                                                            <ItemTemplate>
                                                                <%# gvApplication.PageIndex * gvApplication.PageSize + Container.DisplayIndex + 1%>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="公司名称" ItemStyle-HorizontalAlign="Left">
                                                            <ItemTemplate>
                                                                <asp:Label runat="server" ID="lblCompanyName"></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="候选人数" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="60px">
                                                            <ItemTemplate>
                                                                <asp:Label runat="server" ID="lblCandidateCount"></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="提交日期" ItemStyle-Width="70px">
                                                            <ItemTemplate>
                                                                <%# ((DateTime)DataBinder.Eval(Container.DataItem, "AppliedDate")).ToString("yyyy-MM-dd")%>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="提交人" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="60px">
                                                            <ItemTemplate>
                                                                <asp:Label runat="server" ID="lblAppliedBy"></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="状态" ItemStyle-Width="60px">
                                                            <ItemTemplate>
                                                                <asp:Label runat="server" ID="lblStatus"></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="操作" ItemStyle-Width="60px">
                                                            <ItemTemplate>
                                                                <asp:HyperLink runat="server" ID="hlPreview">浏览候选者</asp:HyperLink>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                    </Columns>
                                                </asp:GridView>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <iOak:PagerControl runat="server" ID="pagerControl" PageIndexChange="pagerControl_PageIndexChange">
                                                </iOak:PagerControl>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </div>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
    <asp:Button runat="server" ID="btnPostBack" CssClass="hidden" OnClick="btnPostBack_Click" />
    <asp:HiddenField runat="server" ID="hidEventName" />
    <asp:HiddenField runat="server" ID="hidEventArguments" />
</asp:Content>
